<?php


namespace App\Service\Gaode\api;


use App\Service\Gaode\ApiClient;

class Place
{
    /**
     * @var string
     */
    private $prex = "/v3/place/";

    /**
     * around
     * @param string $location
     * @param string $keywords
     * @param int $page
     * @param int $offset
     * @param int $radius
     * @return array
     * date:2022/7/13
     * time:14:43
     * auth：xyc
     */
    public function around(string $location, string $keywords, int $page = 1, int $offset = 20, int $radius = 1000)
    {
        $arr = compact('location', 'radius', 'keywords', 'page', 'offset', 'radius');
        $arr = array_merge($arr, [
            'key' => "174fdaebad0301b076eb507395b4f5c1",
        ]);

        $api = $this->prex . "around";
        return ['GET', $api, [
            'query' => $arr
        ]];
    }

}